﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AnnouncementServices;
using MySilverlightApplication.Model;

namespace MySilverlightApplication.MSTest
{
    class MockAnnouncementsModel : IAnnouncementsModel
    {
        public void GetAnnouncementList(Action<IEnumerable<Announcement>> action)
        {
            action(MockData());
        }

        public IEnumerable<Announcement> MockData()
        {
            return new[]
                  {
                    new Announcement()
                    {
                      Title = "Test Title 1",
                      CreatedDate = new DateTime(2009, 9, 9)
                    },
                    new Announcement()
                    {
                      Title = "Test Title 2",
                      CreatedDate = new DateTime(2009, 9, 10)
                    }
                  };
        }
    }
}
